package com.xingchen.loveparttimejob.model.pojo;

import java.sql.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author lwj
 * @date 2024-12-03
 * @vesion 1.0.0
 */
public class Vip {
    /**
     * 会员编号
     */
    private int vId;
    /**
     * 连接用户表
     */
    private int uId;
    /**
     * 会员开始时间
     */
    private Date startTime;
    /**
     * 会员截至时间
     */
    private Date deadline;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 是否删除
     */
    private int state;

    // 构造方法
    public Vip() {}
    public Vip(int vId, int uId, Date startTime, Date deadline, Date createTime, int state) {
        this.vId = vId;
        this.uId = uId;
        this.startTime = startTime;
        this.deadline = deadline;
        this.createTime = createTime;
        this.state = state;
    }

    /**
     * 反射中使用到
     * @return
     */
    public Map<String,String> getMapping(){
        Map<String,String> map = new HashMap<>();
        map.put("vId","v_id");
        map.put("uId","u_id");
        map.put("startTime","start_time");
        map.put("deadline","deadline");
        map.put("createTime","create_time");
        map.put("state","state");
        return map;
    }

    // 属性
    public int getvId() {
        return vId;
    }

    public void setvId(int vId) {
        this.vId = vId;
    }

    public int getuId() {
        return uId;
    }

    public void setuId(int uId) {
        this.uId = uId;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getDeadline() {
        return deadline;
    }

    public void setDeadline(Date deadline) {
        this.deadline = deadline;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    /**
     * 打印会员表信息
     * @return
     */
    @Override
    public String toString() {
        return "Vip{" +
                "vId=" + vId +
                ", uId=" + uId +
                ", startTime=" + startTime +
                ", deadline=" + deadline +
                ", createTime=" + createTime +
                ", state=" + state +
                '}';
    }
}
